Use valid and spec-compliant MP4 file for all tests. r=gerald,jgraham (#3903) * Test for writable effect. MozReview-Commit-ID: 2hMY2barRb9 Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1049975 * Respect type-in state when caching inline styles; MozReview-Commit-ID: OZCUbNUvmz Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1250805 * Pointer Event] Refine setPointerCapture / releasePointerCapture to follow the algorithm defined in the spec. f=bevistseng, Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1294335 * The error event in a worker (firing at the worker's global) should have the original exception value in its .error property. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=986459 * Do not write <parsererror> nodes for invalid XML documents in XMLHttpRequests made by web content. r=billm, Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=289714 * Add reftests. r=dholbert,heycam MANIFEST.json is revised automatically by --manifest-update. MozReview-Commit-ID: PZgNtDlaFk Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1245751 * Add tests for a, script, mpath, and animate elements. r=dholbert,heycam Extend the original test for <a> element in dom/svg/ and add some mochitests in svg/linking/scripted/. MozReview-Commit-ID: G7lszyUVMiU Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1245751 * Fix setting location.hash for documents with about:something URIs to actually work. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1298977 * Support :indeterminate pseudo-class for radio groups. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=885359 * HTMLFormElemement should have unenumerable named properties per spec. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1270369 * Rework animation phase and fill mode handling This reflects the following updates to the spec: https://github.com/w3c/web-animations/commit/9369384f6cfa0716520595bed9d05a51197efecc MozReview-Commit-ID: JYUOZcnPEJQ Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1299695 * Pointer Event] Update web-platform-test pointerevent_element_haspointercapture-manual.html. f=bevistseng Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1298255 * Make sure the parser insertion point is defined when firing the load event for external <scripts> or firing the error event on a failed external script load (but not other cases, like bogus script URL). If we have a creator parser, then we were a parser-inserted script and should presumably be able to set a valid insertion point when we run or fire our load/error events. For the error event case, we do this in nsScriptElement::ScriptAvailable, so that async error events due to things like bogus script URLs do not end up with a valid insertion point. For the load event case, we just do this in ScriptEvaluated directly. ScriptEvaluated is called while the scriptloader has our script set as the current parser-inserted script. But for the error event case we need to maintain that state around the ScriptAvailable call that will fire the event. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1297125 * Remove the existing Location hardcoding in js::SetPrototype now that Location handles that itself. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1299306 * Let the web platform test scheme-data.html pass for HEAD and POST requests. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1063526 * Test for setting spacing. MozReview-Commit-ID: 5pMhC00vNIh Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1274944 * Throw NetworkErrors instead of failures where appropriate for some XHR web platform tests. r=bz, r=keeler, r=Mossop, Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=918751 * P5 - Adding new tests for SRI and enabling test for Request's integrity attribute in wpt. r=bkelly. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1187335 * P6 - Support script/css to set integrity metadata to serviceWorker. r=bkelly. r=francois. Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1187335 * Use valid and spec-compliant MP4 file for all tests. r=gerald,jgraham The MP4 used in the tests was invalid: 1- It contains out of order and overlapping frames 2- The first frame for each of the first 9 media segments were marked as keyframe, even though they weren't The new file was encoded such that: - The total bitrate remains the same as in the previous files - The total duration is similar - Each media segment starts with a valid keyframe - Frames are properly ordered - GOP is made of 24 frames - The video track doesn't start at 0, which helps testing the proper behaviour regarding buffered range calculation. - Like in the previous video, the audio track is present but made of silence (which is puzzling for a video initially designed to test A/V sync) The webm file presents the same characteristics. MozReview-Commit-ID: 6AKKmInaenE Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1300296 
diff --git a/media-source/mediasource-remove.html b/media-source/mediasource-remove.html index ee5c0781..9a4eb3f 100644 --- a/media-source/mediasource-remove.html +++ b/media-source/mediasource-remove.html 
@@ -286,8 +286,8 @@  removeAppendedDataTests(function(test, mediaSource, sourceBuffer, duration, subType, segmentInfo)  {  var expectations = { - webm: ("{ [3.187, " + duration + ") }"), - mp4: ("{ [3.187, " + duration + ") }"), + webm: ("{ [3.315, " + duration + ") }"), + mp4: ("{ [3.298, " + duration + ") }"),  };    // Note: Range doesn't start exactly at the end of the remove range because there isn't @@ -299,8 +299,8 @@  {  var start = Math.max(segmentInfo.media[0].timev, segmentInfo.media[0].timea).toFixed(3);  var expectations = { - webm: ("{ [" + start + ", 1.012) [3.187, " + duration + ") }"), - mp4: ("{ [" + start + ", 0.996) [3.187, " + duration + ") }"), + webm: ("{ [" + start + ", 1.005) [3.315, " + duration + ") }"), + mp4: ("{ [" + start + ", 0.997) [3.298, " + duration + ") }"),  };    // Note: The first resulting range ends slightly after start because the removal algorithm only removes @@ -313,7 +313,7 @@  {  var start = Math.max(segmentInfo.media[0].timev, segmentInfo.media[0].timea).toFixed(3);  var expectations = { - webm: "{ [" + start + ", 1.029) }", + webm: "{ [" + start + ", 1.013) }",  mp4: "{ [" + start + ", 1.022) }",  };   
diff --git a/media-source/mediasource-sequencemode-append-buffer.html b/media-source/mediasource-sequencemode-append-buffer.html index 808c597..92a01ab 100644 --- a/media-source/mediasource-sequencemode-append-buffer.html +++ b/media-source/mediasource-sequencemode-append-buffer.html 
@@ -61,7 +61,7 @@  // Prior to EOS, the buffered range end time may not have fully reached the next media  // segment's timecode (adjusted by any timestampOffset). It should not exceed it though.  // Therefore, an exact assertBufferedEquals() will not work here. - assert_equals(sourceBuffer.buffered.length, 1, "sourceBuffer.buffered has 1 range before EOS"); + assert_greater_than(sourceBuffer.buffered.length, 0, "sourceBuffer.buffered has at least 1 range before EOS");  assert_equals(threeDecimalPlaces(sourceBuffer.buffered.start(0)),  threeDecimalPlaces(expectedBufferedRangeStartTime),  "sourceBuffer.buffered range begins where expected before EOS"); 
diff --git a/media-source/mediasource-util.js b/media-source/mediasource-util.js index 30c37e7..15a56e8 100644 --- a/media-source/mediasource-util.js +++ b/media-source/mediasource-util.js 
@@ -1,65 +1,37 @@ -// Copyright © 2016 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -  (function(window) {  var SEGMENT_INFO_LIST = [  {  url: 'mp4/test.mp4',  type: 'video/mp4; codecs="mp4a.40.2,avc1.4d400d"', - duration: 6.0756, - init: { offset: 0, size: 1197 }, + duration: 6.549, + init: { offset: 0, size: 1413 },  media: [ - { offset: 1241, size: 17845, timev: 0.033200, timea: 0, endtimev: 0.531200, endtimea: 0.510839 }, - { offset: 19130, size: 5551, timev: 0.464800, timea: 0.510839, endtimev: 0.796800, endtimea: 0.812698 }, - { offset: 24725, size: 10944, timev: 0.796800, timea: 0.812698, endtimev: 0.929600, endtimea: 0.905578 }, - { offset: 35713, size: 7131, timev: 0.863200, timea: 0.905578, endtimev: 1.195200, endtimea: 1.184217 }, - { offset: 42888, size: 2513, timev: 1.128800, timea: 1.184217, endtimev: 1.328000, endtimea: 1.300317 }, - { offset: 45457, size: 3022, timev: 1.261600, timea: 1.300317, endtimev: 1.460800, endtimea: 1.509297 }, - { offset: 48479, size: 815, timev: 1.494000, timea: 1.509297, endtimev: 1.527200, endtimea: 1.532517 }, - { offset: 49338, size: 2818, timev: 1.460800, timea: 1.532517, endtimev: 1.626800, endtimea: 1.648616 }, - { offset: 52200, size: 11581, timev: 1.626800, timea: 1.648616, endtimev: 1.792800, endtimea: 1.764716 }, - { offset: 63825, size: 3003, timev: 1.726400, timea: 1.764716, endtimev: 1.925600, endtimea: 1.973696 }, - { offset: 66872, size: 6390, timev: 1.925600, timea: 1.973696, endtimev: 2.191200, endtimea: 2.159455 }, - { offset: 73306, size: 3740, timev: 2.124800, timea: 2.159455, endtimev: 2.390400, endtimea: 2.368435 }, - { offset: 77102, size: 11779, timev: 2.324000, timea: 2.368435, endtimev: 2.523200, endtimea: 2.577414 }, - { offset: 88881, size: 851, timev: 2.556400, timea: 2.577414, endtimev: 2.589600, endtimea: 2.600634 }, - { offset: 89776, size: 4236, timev: 2.523200, timea: 2.600634, endtimev: 2.788800, endtimea: 2.832834 }, - { offset: 94056, size: 9538, timev: 2.788800, timea: 2.832834, endtimev: 3.187200, endtimea: 3.204353 }, - { offset: 103638, size: 13295, timev: 3.187200, timea: 3.204353, endtimev: 3.452800, endtimea: 3.436553 }, - { offset: 116977, size: 309, timev: 3.386400, timea: 3.436553, endtimev: 3.419600, endtimea: 3.506213 }, - { offset: 117330, size: 5806, timev: 3.452800, timea: 3.506213, endtimev: 3.784800, endtimea: 3.831292 }, - { offset: 123180, size: 4392, timev: 3.784800, timea: 3.831292, endtimev: 4.017200, endtimea: 4.040272 }, - { offset: 127616, size: 15408, timev: 4.017200, timea: 4.040272, endtimev: 4.249600, endtimea: 4.295691 }, - { offset: 143068, size: 9899, timev: 4.249600, timea: 4.295691, endtimev: 4.814000, endtimea: 4.829750 }, - { offset: 153011, size: 11562, timev: 4.814000, timea: 4.829750, endtimev: 4.980000, endtimea: 5.015510 }, - { offset: 164617, size: 7398, timev: 4.980000, timea: 5.015510, endtimev: 5.245600, endtimea: 5.294149 }, - { offset: 172059, size: 5698, timev: 5.245600, timea: 5.294149, endtimev: 5.577600, endtimea: 5.549569 }, - { offset: 177801, size: 11682, timev: 5.511200, timea: 5.549569, endtimev: 5.710400, endtimea: 5.758548 }, - { offset: 189527, size: 3023, timev: 5.710400, timea: 5.758548, endtimev: 5.909600, endtimea: 5.897868 }, - { offset: 192594, size: 5726, timev: 5.843200, timea: 5.897868, endtimev: 6.075600, endtimea: 6.037188 }, + { offset: 1413, size: 24034, timev: 0.095000, timea: 0, endtimev: 0.896666, endtimea: 0.882358 }, + { offset: 25447, size: 21757, timev: 0.896666, timea: 0.882358, endtimev: 1.696666, endtimea: 1.671836 }, + { offset: 47204, size: 23591, timev: 1.696666, timea: 1.671836, endtimev: 2.498333, endtimea: 2.461315 }, + { offset: 70795, size: 22614, timev: 2.498333, timea: 2.461315, endtimev: 3.298333, endtimea: 3.297233 }, + { offset: 93409, size: 18353, timev: 3.298333, timea: 3.297233, endtimev: 4.100000, endtimea: 4.086712}, + { offset: 111762, size: 23935, timev: 4.100000, timea: 4.086712, endtimev: 4.900000, endtimea: 4.876190 }, + { offset: 135697, size: 21911, timev: 4.900000, timea: 4.876190, endtimev: 5.701666, endtimea: 5.665668 }, + { offset: 157608, size: 23776, timev: 5.701666, timea: 5.665668, endtimev: 6.501666, endtimea: 6.501587 }, + { offset: 181384, size: 5843, timev: 6.501666, timea: 6.501587, endtimev: 6.501666, endtimea: 6.501678 },  ]  },  {  url: 'webm/test.webm',  type: 'video/webm; codecs="vp8, vorbis"', - duration: 6.042, - init: { offset: 0, size: 4357 }, + duration: 6.552, + init: { offset: 0, size: 4116 },  media: [ - { offset: 4357, size: 11830, timev: 0, timea: 0, endtimev: 0.398000, endtimea: 0.384000 }, - { offset: 16187, size: 12588, timev: 0.398000, timea: 0.385000, endtimev: 0.798000, endtimea: 0.779000 }, - { offset: 28775, size: 14588, timev: 0.797000, timea: 0.779000, endtimev: 1.195000, endtimea: 1.174000 }, - { offset: 43363, size: 13023, timev: 1.195000, timea: 1.174000, endtimev: 1.593000, endtimea: 1.592000 }, - { offset: 56386, size: 13127, timev: 1.594000, timea: 1.592000, endtimev: 1.992000, endtimea: 1.988000 }, - { offset: 69513, size: 14456, timev: 1.992000, timea: 1.987000, endtimev: 2.390000, endtimea: 2.381000 }, - { offset: 83969, size: 13458, timev: 2.390000, timea: 2.381000, endtimev: 2.790000, endtimea: 2.776000 }, - { offset: 97427, size: 14566, timev: 2.789000, timea: 2.776000, endtimev: 3.187000, endtimea: 3.171000 }, - { offset: 111993, size: 13201, timev: 3.187000, timea: 3.171000, endtimev: 3.585000, endtimea: 3.565000 }, - { offset: 125194, size: 14061, timev: 3.586000, timea: 3.566000, endtimev: 3.984000, endtimea: 3.960000 }, - { offset: 139255, size: 15353, timev: 3.984000, timea: 3.960000, endtimev: 4.382000, endtimea: 4.378000 }, - { offset: 154608, size: 13618, timev: 4.382000, timea: 4.378000, endtimev: 4.782000, endtimea: 4.773000 }, - { offset: 168226, size: 15094, timev: 4.781000, timea: 4.773000, endtimev: 5.179000, endtimea: 5.169000 }, - { offset: 183320, size: 13069, timev: 5.179000, timea: 5.168000, endtimev: 5.577000, endtimea: 5.562000 }, - { offset: 196389, size: 13788, timev: 5.578000, timea: 5.563000, endtimev: 5.976000, endtimea: 5.957000 }, - { offset: 210177, size: 9009, timev: 5.976000, timea: 5.957000, endtimev: 6.042000, endtimea: 6.050000 }, + { offset: 4116, size: 26583, timev: 0.112000, timea: 0, endtimev: 0.913000, endtimea: 0.912000 }, + { offset: 30699, size: 20555, timev: 0.913000, timea: 0.912000, endtimev: 1.714000, endtimea: 1.701000 }, + { offset: 51254, size: 22668, timev: 1.714000, timea: 1.701000, endtimev: 2.515000, endtimea: 2.514000 }, + { offset: 73922, size: 21943, timev: 2.515000, timea: 2.514000, endtimev: 3.315000, endtimea: 3.303000 }, + { offset: 95865, size: 23015, timev: 3.315000, timea: 3.303000, endtimev: 4.116000, endtimea: 4.093000}, + { offset: 118880, size: 20406, timev: 4.116000, timea: 4.093000, endtimev: 4.917000, endtimea: 4.906000 }, + { offset: 139286, size: 21537, timev: 4.917000, timea: 4.906000, endtimev: 5.718000, endtimea: 5.695000 }, + { offset: 160823, size: 24027, timev: 5.718000, timea: 5.695000, endtimev: 6.519000, endtimea: 6.508000 }, + { offset: 184850, size: 5955, timev: 6.519000, timea: 6.508000, endtimev: 6.577000, endtimea: 6.577000},  ],  }  ]; 
diff --git a/media-source/mp4/test.mp4 b/media-source/mp4/test.mp4 index eca97aa..1b0e7b5 100644 --- a/media-source/mp4/test.mp4 +++ b/media-source/mp4/test.mp4 Binary files differ 
diff --git a/media-source/webm/test.webm b/media-source/webm/test.webm index 6c2138d..3a60180 100644 --- a/media-source/webm/test.webm +++ b/media-source/webm/test.webm Binary files differ